
import  {xsEntity} from '../commentity';
import { Column ,Entity, OneToMany} from 'typeorm';
import { NovelEntity } from '../novel/novel';

/**
 * 描述
 */
@Entity()
export class ClassifyEntity extends xsEntity {
  @Column({ comment: '父级' ,default:null })
  pid: number;
  @Column({ comment: '分类名',default:null })


  name: string;
  @Column({ comment: '关键词',default:null })
  keywords: string;

  @Column({ comment: '排序',default:null })
  desc: string;

  @Column({ comment: '图标',default:null })
  iconUrl: string;

  @Column({ comment: '大图',default:null })
  picUrl: string;

  @Column({ comment: '类目等级',default:null })
  level: string;
  
  @Column({ comment: '删除' ,default:0})
  deleted: boolean;
  @OneToMany( ()=>NovelEntity , novelEntity => novelEntity.categoryId)
  novels: NovelEntity

}
